/* 作业管理页面样式 */

.task-management-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    margin-top: 20px;
}


/* 任务列表样式 */

.task-list {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.task-controls {
    display: flex;
    gap: 10px;
}

.task-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.task-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.task-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.task-item.active {
    background: #e3f2fd;
    border-color: #2196f3;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-title {
    font-weight: 600;
    color: #333;
}

.task-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-running {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-waiting {
    background: #fff3e0;
    color: #ef6c00;
}

.status-completed {
    background: #e3f2fd;
    color: #1976d2;
}

.task-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 13px;
    color: #666;
}

.task-progress {
    margin-top: 10px;
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #2196f3;
    transition: width 0.3s ease;
}


/* 任务详情样式 */

.task-detail {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.task-detail.active {
    display: block;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.close-detail {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.detail-content {
    padding: 20px;
}

.info-group {
    margin-bottom: 15px;
}

.info-group label {
    display: block;
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.info-group span {
    color: #333;
    font-size: 14px;
}

.device-list {
    margin-top: 20px;
}

.device-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 8px;
}

.device-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-info {
    flex: 1;
}

.device-name {
    font-weight: 500;
    color: #333;
}

.device-status {
    font-size: 12px;
    color: #666;
}

.task-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}


/* 模态框样式 */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}


/* 按钮样式 */

.btn-primary {
    background: #2196f3;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #1976d2;
}

.btn-secondary {
    background: #e9ecef;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
}


/* 响应式设计 */

@media (max-width: 768px) {
    .task-management-container {
        grid-template-columns: 1fr;
    }
    .task-detail {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 350px;
        z-index: 100;
    }
    .task-controls {
        flex-direction: column;
    }
    .task-info {
        grid-template-columns: 1fr;
    }
}


/* 数据统计样式 */

.efficiency-stats,
.utilization-stats,
.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #2196f3;
    position: relative;
    padding-right: 20px;
}

.stat-value::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2196f3;
}


/* 不同状态的颜色 */

.efficiency-stats .stat-value {
    color: #4caf50;
}

.efficiency-stats .stat-value::after {
    background: #4caf50;
}

.utilization-stats .stat-value {
    color: #ff9800;
}

.utilization-stats .stat-value::after {
    background: #ff9800;
}

.progress-stats .stat-value {
    color: #9c27b0;
}

.progress-stats .stat-value::after {
    background: #9c27b0;
}